package com.yuwei.play.adapter

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yuwei.play.R
import com.yuwei.play.entity.CommentEntity
import com.yuwei.play.entity.CommentEntityItem
import com.yuwei.play.entity.Reply

class CommentTwoAdapter:BaseQuickAdapter<Reply,BaseViewHolder>(R.layout.comment_two_item) {
    override fun convert(holder: BaseViewHolder, item: Reply) {
        val iv = holder.getView<ImageView>(R.id.commit_iv)
        Glide.with(context).load(if (item.userlogo.isNotEmpty()) item.userlogo else R.drawable.sunrise).circleCrop().into(iv)
        holder.setText(R.id.comment_name,if (item.nickname.isNotEmpty())item.nickname else "最帅黑大帅")
        holder.setText(R.id.comment_content,if (item.content.isNotEmpty()) item.content else "高考加油！！！")
    }
}